package 多线程.生产者消费者模式;
//消费者类
public class Customer implements Runnable {
    private Box b;
    public Customer(Box b) {
        this.b = b;
    }

    @Override
    public void run() {
        while (true){
            try {
                b.get();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

    }
}
